import request from '@/utils/request'

// 查询聊天记录列表
export function listChatMsg(query) {
    return request({
        url: '/passenger/ChatMsg/list',
        method: 'get',
        params: query
    })
}

// 查询聊天记录详细
export function getChatMsg(chatId) {
    return request({
        url: '/passenger/ChatMsg/' + chatId,
        method: 'get'
    })
}

// 新增聊天记录
export function addChatMsg(data) {
    return request({
        url: '/passenger/ChatMsg',
        method: 'post',
        data: data
    })
}

// 修改聊天记录
export function updateChatMsg(data) {
    return request({
        url: '/passenger/ChatMsg',
        method: 'put',
        data: data
    })
}

// 删除聊天记录
export function delChatMsg(chatId) {
    return request({
        url: '/passenger/ChatMsg/' + chatId,
        method: 'delete'
    })
}

// 查找地址详情
export function findAddr(addr) {
    return request({
        url: '/passenger/ChatMsg/findAddr',
        method: 'get',
        params: { addr }
    })
}
//支付
export function alipayTradePagePay(data) {
    return request({
        url: '/pay/pay/alipayTradePagePay?orderCard='+data.orderCard+"&payType="+data.payType,
        method: 'get'
        // data: data
    })
}
